/* 
 * File:   WindowException.h
 * Author: johannes
 *
 * Created on December 26, 2013, 4:06 PM
 */

#ifndef WINDOWEXCEPTION_H
#define	WINDOWEXCEPTION_H

#include "GraphicException.h"
#include "Window.h"

using System::Graphic::Window;

namespace System
{
    namespace Exception
    {
        enum WINDOWEXCEPTIONS
        {
            LOAD,
            SURFACE,
            UNKNOWN
        };
        
        class WindowException : public GraphicException
        {
        private:

            Window*        m_FailedWindow;
            int                     m_Code;

        protected:
        public:

            WindowException(Window* win,std::string msg,int code)throw() :m_FailedWindow(win),GraphicException("WindowExcepion ->"+msg),m_Code(code)
            {

            }
            virtual ~WindowException()throw() {} ;

            const char* what() throw() { return this->m_msg.c_str(); }


        };
    }
}



#endif	/* WINDOWEXCEPTION_H */

